﻿namespace Forms
{
    using CrystalDecisions.Windows.Forms;

    using Forms.My;

    using Microsoft.VisualBasic.CompilerServices;

    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class frmDruck : Form
    {
        [AccessedThroughProperty("butSchliessen")]
        private Button _butSchliessen;
        [AccessedThroughProperty("CrystalReportViewer")]
        private CrystalDecisions.Windows.Forms.CrystalReportViewer _CrystalReportViewer;
        public repDruck rep;

        public frmDruck()
        {
            base.Load += new EventHandler(this.frmDruck_Load);
            this.rep = new repDruck();
            this.InitializeComponent();
        }

        private void butSchliessen_Click(object sender, EventArgs e)
        {
            this.Close();
        }

    

        private void frmDruck_Load(object sender, EventArgs e)
        {
            DataView view = new DataView();
            view.Table = MyProject.Forms.Main.cs.Table_Auswertung;
            view.RowFilter = MyProject.Forms.frmAuswertung.FilterString;
            this.CrystalReportViewer.ReportSource = this.rep;
            Control crystalReportViewer = this.CrystalReportViewer;
            this.Hide_PageView(ref crystalReportViewer);
            this.CrystalReportViewer = (CrystalDecisions.Windows.Forms.CrystalReportViewer) crystalReportViewer;
            this.rep.SetDataSource(view);
            this.rep.Refresh();
            this.rep.RecordSelectionFormula = "";
            this.rep.SetParameterValue("FilterText", MyProject.Forms.frmAuswertung.FilterBeschreibung);
        }

        private void Hide_PageView(ref Control ReportViewer)
        {
            IEnumerator enumerator = ReportViewer.Controls.GetEnumerator();
            try
            {

                while (enumerator.MoveNext())
                {
                    object objectValue = RuntimeHelpers.GetObjectValue(enumerator.Current);
                    if (objectValue.GetType().Name == "PageView")
                    {
                        PageView view = (PageView) objectValue;
                        TabControl control2 = (TabControl) view.Controls[0];
                        control2.Appearance = TabAppearance.Buttons;
                        Size size = new Size(0, 1);
                        control2.ItemSize = size;
                        control2.SizeMode = TabSizeMode.Fixed;
                        control2 = null;
                    }
                }
            }
            finally
            {
                if (enumerator is IDisposable)
                {
                    (enumerator as IDisposable).Dispose();
                }
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            this.butSchliessen = new Button();
            this.CrystalReportViewer = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
            this.SuspendLayout();
            this.butSchliessen.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            Point point = new Point(0x225, 0x219);
            this.butSchliessen.Location = point;
            this.butSchliessen.Name = "butSchliessen";
            Size size = new Size(0x71, 0x1a);
            this.butSchliessen.Size = size;
            this.butSchliessen.TabIndex = 1;
            this.butSchliessen.Text = "Schließen";
            this.butSchliessen.UseVisualStyleBackColor = true;
            this.CrystalReportViewer.ActiveViewIndex = -1;
            this.CrystalReportViewer.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.CrystalReportViewer.BorderStyle = BorderStyle.FixedSingle;
            this.CrystalReportViewer.DisplayGroupTree =false;
            point = new Point(12, 12);
            this.CrystalReportViewer.Location = point;
            this.CrystalReportViewer.Name = "CrystalReportViewer";
            this.CrystalReportViewer.SelectionFormula = "";
            this.CrystalReportViewer.ShowCloseButton = false;
            this.CrystalReportViewer.ShowGroupTreeButton = false;
            this.CrystalReportViewer.ShowRefreshButton = false;
            size = new Size(650, 0x207);
            this.CrystalReportViewer.Size = size;
            this.CrystalReportViewer.TabIndex = 2;
            this.CrystalReportViewer.ViewTimeSelectionFormula = "";
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x2a2, 0x23f);
            this.ClientSize = size;
            this.Controls.Add(this.CrystalReportViewer);
            this.Controls.Add(this.butSchliessen);
            this.Name = "frmDruck";
            this.Text = "Druckvorschau";
            this.ResumeLayout(false);
        }

        internal virtual Button butSchliessen
        {
            [DebuggerNonUserCode]
            get
            {
                return this._butSchliessen;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.butSchliessen_Click);
                if (this._butSchliessen != null)
                {
                    this._butSchliessen.Click -= handler;
                }
                this._butSchliessen = value;
                if (this._butSchliessen != null)
                {
                    this._butSchliessen.Click += handler;
                }
            }
        }

        internal virtual CrystalDecisions.Windows.Forms.CrystalReportViewer CrystalReportViewer
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CrystalReportViewer;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CrystalReportViewer = value;
            }
        }
    }
}

